<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.org/ui" template="/paginas/template.xhtml">



	<ui:define name="corpoForm">
		

		<h:form id="formGerarRelatorios" prependId="false" target="_blank">
			<p:panel id="pnlGerarRelatorios" header="#{rsc.label_relatorios}"
				toggleable="true" toggleSpeed="500">
				<p:panelGrid columns="2" styleClass="full-width">
					<p:panelGrid columns="1">
						<p:menu>
							<p:submenu label="#{rsc.menu_relatoriosFinanceiros}">
								<p:menuitem value="#{rsc.menu_fluxoCaixa}"
									update="pnlGerarRelatorios"
									actionListener="#{gerarRelatorio.fluxoCaixa}" />

								<p:menuitem value="#{rsc.menu_evolucaoSaldo}"
									update="pnlGerarRelatorios"
									actionListener="#{gerarRelatorio.evolucaoSaldo}" />

								<p:menuitem value="#{rsc.menu_extratoConta}"
									update="pnlGerarRelatorios"
									actionListener="#{gerarRelatorio.extratoConta}" />
							</p:submenu>
						</p:menu>
					</p:panelGrid>
					<p:panelGrid columns="2" styleClass="full-width"
						rendered="#{gerarRelatorio.formulario.fluxoCaixa}">

						<f:facet name="header">
							<h:outputText value="#{rsc.label_relatorioFluxoCaixa}" />
						</f:facet>

						<h:outputText for="cldDataInicio" value="#{rsc.label_dataInicio}" />

						<h:outputText for="cldDataFim" value="#{rsc.label_dataFim}" />

						<p:calendar pattern="dd/MM/yyyy" size="15" showOn="button"
							id="cldDataInicio"
							value="#{gerarRelatorio.formulario.dataInicio}">
						</p:calendar>

						<p:calendar pattern="dd/MM/yyyy" size="15" showOn="button"
							id="cldDataFim" value="#{gerarRelatorio.formulario.dataFim}">
						</p:calendar>


						<p:panelGrid columns="1">
							<h:outputText for="cmbContas" value="#{rsc.label_conta}" />

							<p:selectOneMenu label="#{rsc.label_conta}"
								value="#{gerarRelatorio.formulario.idConta}" id="cmbConta">
								<f:selectItem itemLabel="#{rsc.label_selecionar}" itemValue="" />
								<f:selectItems value="#{gerarRelatorio.formulario.contas}"
									var="c" itemLabel="#{c.nome}" itemValue="#{c.id}" />
							</p:selectOneMenu>
						</p:panelGrid>


						<p:panelGrid columns="1">
							<p:outputLabel for="chkCategoria"
								value="#{rsc.label_somenteCategoriasLancamento}" />

							<p:selectOneRadio id="chkCategoria"
								value="#{gerarRelatorio.formulario.somenteCategorias}">
								<f:selectItem itemLabel=" " itemValue="true" />
							</p:selectOneRadio>
						</p:panelGrid>

						<p:commandButton value="#{rsc.label_gerar}"
							action="#{gerarRelatorio.gerarFluxoCaixa}" ajax="false"
							oncomplete="window.open('fluxoCaixa.xhtml')"
							title="#{rsc.title_gerar}">
						</p:commandButton>

					</p:panelGrid>



					<p:panelGrid columns="1" styleClass="70Porcento"
						rendered="#{gerarRelatorio.formulario.evolucaoSaldo}">

					</p:panelGrid>


					<p:panelGrid columns="1" styleClass="70Porcento"
						rendered="#{gerarRelatorio.formulario.extratoConta}">

					</p:panelGrid>

				</p:panelGrid>

			</p:panel>
		</h:form>

	</ui:define>
</ui:composition>

